package app.test;

import java.util.List;
import java.util.Map;

import android.content.Context;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;
import android.widget.SimpleAdapter;

public class ui_listview extends SimpleAdapter{

	   private int[] colors = null;  
	   public ui_listview(Context context,List<? extends Map<String, ?>> data,  
	           int resource, String[] from, int[] to) {  
	       super(context, data, resource, from, to);  
	       // TODO Auto-generated constructor stub  
	       colors = new int[]{Color.argb(255, 173, 173, 175), Color.argb(255, 152, 151, 156)};
	   }  

	   @Override  
	   public View getView(int position, View convertView, ViewGroup parent) {  
	       // TODO Auto-generated method stub  
	       View view = super.getView(position, convertView, parent);  
	       int colorPos = position%colors.length;  
	       view.setBackgroundColor(colors[colorPos]);  
	       return view;  
	   }  


}
